﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using bdnt_pets_system.Tools;
using bdnt_pets_system.Resources;

namespace bdnt_pets_system.MyUserControls
{
    public partial class MyPageControl : UserControl
    {
        public MyPageControl()
        {
            InitializeComponent();
        }
        public int PageIndex
        {

            get
            {
                return dpPage.PageIndex;
            }
        }

        public void LoadPages(int totalCount, int pageSize)
        {
            var pcv = DgPageView.GetPCV(totalCount, pageSize);
            dpPage.Source = pcv;
            dpPage.PageSize = 1;
            dpPage.PageIndex = 0;
            tbTotalCount.Text = MyStrings.hj + ": " + totalCount.ToString();
        }
    }
}
